const state = {
    directory: [],  // 文件夹
    musicList: [] //  本地歌曲列表
}
const mutations = {
    // 添加文件夹
    ADD_DIRECTORY(state, directory) {
        state.directory = directory
    },
    // 添加本地音乐
    ADD_LOCAL_MUSIC(state, list) {
        state.musicList = []
        state.musicList = list
    }
}
let actions = {
    // 添加文件夹
    addDirectory(context, directory) {
        this.commit("ADD_DIRECTORY", directory)
    },
    addLocalMusic(context, list) {
        this.commit("ADD_LOCAL_MUSIC", list)
    }
}
let getters = {
    getDirectory: state => state.directory,
    getLocalMusic: state => state.musicList
}
export default {
    state,
    mutations,
    actions,
    getters
}